using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class CustomizedInfo : GeneratedMessageLite<CustomizedInfo, CustomizedInfo.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<CustomizedInfo, CustomizedInfo.Builder>
		{
			private bool resultIsReadOnly;
			private CustomizedInfo result;
			protected override CustomizedInfo.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override CustomizedInfo MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override CustomizedInfo DefaultInstanceForType
			{
				get
				{
					return CustomizedInfo.DefaultInstance;
				}
			}
			public uint BrandFlag
			{
				get
				{
					return this.result.BrandFlag;
				}
				set
				{
					this.SetBrandFlag(value);
				}
			}
			public string ExternalInfo
			{
				get
				{
					return this.result.ExternalInfo;
				}
				set
				{
					this.SetExternalInfo(value);
				}
			}
			public string BrandInfo
			{
				get
				{
					return this.result.BrandInfo;
				}
				set
				{
					this.SetBrandInfo(value);
				}
			}
			public string BrandIconURL
			{
				get
				{
					return this.result.BrandIconURL;
				}
				set
				{
					this.SetBrandIconURL(value);
				}
			}
			public Builder()
			{
				this.result = CustomizedInfo.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(CustomizedInfo cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private CustomizedInfo PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					CustomizedInfo other = this.result;
					this.result = new CustomizedInfo();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override CustomizedInfo.Builder Clear()
			{
				this.result = CustomizedInfo.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override CustomizedInfo.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new CustomizedInfo.Builder(this.result);
				}
				return new CustomizedInfo.Builder().MergeFrom(this.result);
			}
			public override CustomizedInfo BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override CustomizedInfo.Builder MergeFrom(IMessageLite other)
			{
				if (other is CustomizedInfo)
				{
					return this.MergeFrom((CustomizedInfo)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override CustomizedInfo.Builder MergeFrom(CustomizedInfo other)
			{
				return this;
			}
			public override CustomizedInfo.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override CustomizedInfo.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(CustomizedInfo._customizedInfoFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = CustomizedInfo._customizedInfoFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 8u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasBrandFlag = input.ReadUInt32(ref this.result.brandFlag_);
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							this.result.hasExternalInfo = input.ReadString(ref this.result.externalInfo_);
							continue;
						}
						if (num3 == 26u)
						{
							this.result.hasBrandInfo = input.ReadString(ref this.result.brandInfo_);
							continue;
						}
						if (num3 == 34u)
						{
							this.result.hasBrandIconURL = input.ReadString(ref this.result.brandIconURL_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public CustomizedInfo.Builder SetBrandFlag(uint value)
			{
				this.PrepareBuilder();
				this.result.hasBrandFlag = true;
				this.result.brandFlag_ = value;
				return this;
			}
			public CustomizedInfo.Builder ClearBrandFlag()
			{
				this.PrepareBuilder();
				this.result.hasBrandFlag = false;
				this.result.brandFlag_ = 0u;
				return this;
			}
			public CustomizedInfo.Builder SetExternalInfo(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasExternalInfo = true;
				this.result.externalInfo_ = value;
				return this;
			}
			public CustomizedInfo.Builder ClearExternalInfo()
			{
				this.PrepareBuilder();
				this.result.hasExternalInfo = false;
				this.result.externalInfo_ = "";
				return this;
			}
			public CustomizedInfo.Builder SetBrandInfo(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBrandInfo = true;
				this.result.brandInfo_ = value;
				return this;
			}
			public CustomizedInfo.Builder ClearBrandInfo()
			{
				this.PrepareBuilder();
				this.result.hasBrandInfo = false;
				this.result.brandInfo_ = "";
				return this;
			}
			public CustomizedInfo.Builder SetBrandIconURL(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBrandIconURL = true;
				this.result.brandIconURL_ = value;
				return this;
			}
			public CustomizedInfo.Builder ClearBrandIconURL()
			{
				this.PrepareBuilder();
				this.result.hasBrandIconURL = false;
				this.result.brandIconURL_ = "";
				return this;
			}
		}
		public const int BrandFlagFieldNumber = 1;
		public const int ExternalInfoFieldNumber = 2;
		public const int BrandInfoFieldNumber = 3;
		public const int BrandIconURLFieldNumber = 4;
		private static readonly CustomizedInfo defaultInstance;
		private static readonly string[] _customizedInfoFieldNames;
		private static readonly uint[] _customizedInfoFieldTags;
		private bool hasBrandFlag;
		private uint brandFlag_;
		private bool hasExternalInfo;
		private string externalInfo_ = "";
		private bool hasBrandInfo;
		private string brandInfo_ = "";
		private bool hasBrandIconURL;
		private string brandIconURL_ = "";
		private int memoizedSerializedSize = -1;
		public static CustomizedInfo DefaultInstance
		{
			get
			{
				return CustomizedInfo.defaultInstance;
			}
		}
		public override CustomizedInfo DefaultInstanceForType
		{
			get
			{
				return CustomizedInfo.DefaultInstance;
			}
		}
		protected override CustomizedInfo ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint BrandFlag
		{
			get
			{
				return this.brandFlag_;
			}
		}
		public string ExternalInfo
		{
			get
			{
				return this.externalInfo_;
			}
		}
		public string BrandInfo
		{
			get
			{
				return this.brandInfo_;
			}
		}
		public string BrandIconURL
		{
			get
			{
				return this.brandIconURL_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBrandFlag;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBrandFlag)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.BrandFlag);
				}
				if (this.hasExternalInfo)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.ExternalInfo);
				}
				if (this.hasBrandInfo)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.BrandInfo);
				}
				if (this.hasBrandIconURL)
				{
					num += CodedOutputStream.ComputeStringSize(4, this.BrandIconURL);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private CustomizedInfo()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] customizedInfoFieldNames = CustomizedInfo._customizedInfoFieldNames;
			if (this.hasBrandFlag)
			{
				output.WriteUInt32(1, customizedInfoFieldNames[0], this.BrandFlag);
			}
			if (this.hasExternalInfo)
			{
				output.WriteString(2, customizedInfoFieldNames[3], this.ExternalInfo);
			}
			if (this.hasBrandInfo)
			{
				output.WriteString(3, customizedInfoFieldNames[2], this.BrandInfo);
			}
			if (this.hasBrandIconURL)
			{
				output.WriteString(4, customizedInfoFieldNames[1], this.BrandIconURL);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBrandFlag)
			{
				num ^= this.brandFlag_.GetHashCode();
			}
			if (this.hasExternalInfo)
			{
				num ^= this.externalInfo_.GetHashCode();
			}
			if (this.hasBrandInfo)
			{
				num ^= this.brandInfo_.GetHashCode();
			}
			if (this.hasBrandIconURL)
			{
				num ^= this.brandIconURL_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			CustomizedInfo customizedInfo = value as CustomizedInfo;
			return customizedInfo != null && (this.hasBrandFlag == customizedInfo.hasBrandFlag && (!this.hasBrandFlag || this.brandFlag_.Equals(customizedInfo.brandFlag_))) && (this.hasExternalInfo == customizedInfo.hasExternalInfo && (!this.hasExternalInfo || this.externalInfo_.Equals(customizedInfo.externalInfo_))) && (this.hasBrandInfo == customizedInfo.hasBrandInfo && (!this.hasBrandInfo || this.brandInfo_.Equals(customizedInfo.brandInfo_))) && (this.hasBrandIconURL == customizedInfo.hasBrandIconURL && (!this.hasBrandIconURL || this.brandIconURL_.Equals(customizedInfo.brandIconURL_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<CustomizedInfo, CustomizedInfo.Builder>.PrintField("BrandFlag", this.hasBrandFlag, this.brandFlag_, writer);
			GeneratedMessageLite<CustomizedInfo, CustomizedInfo.Builder>.PrintField("ExternalInfo", this.hasExternalInfo, this.externalInfo_, writer);
			GeneratedMessageLite<CustomizedInfo, CustomizedInfo.Builder>.PrintField("BrandInfo", this.hasBrandInfo, this.brandInfo_, writer);
			GeneratedMessageLite<CustomizedInfo, CustomizedInfo.Builder>.PrintField("BrandIconURL", this.hasBrandIconURL, this.brandIconURL_, writer);
		}
		public static CustomizedInfo ParseFrom(byte[] data)
		{
			return CustomizedInfo.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private CustomizedInfo MakeReadOnly()
		{
			return this;
		}
		public static CustomizedInfo.Builder CreateBuilder()
		{
			return new CustomizedInfo.Builder();
		}
		public override CustomizedInfo.Builder ToBuilder()
		{
			return CustomizedInfo.CreateBuilder(this);
		}
		public override CustomizedInfo.Builder CreateBuilderForType()
		{
			return new CustomizedInfo.Builder();
		}
		public static CustomizedInfo.Builder CreateBuilder(CustomizedInfo prototype)
		{
			return new CustomizedInfo.Builder(prototype);
		}
		static CustomizedInfo()
		{
			CustomizedInfo.defaultInstance = new CustomizedInfo().MakeReadOnly();
			CustomizedInfo._customizedInfoFieldNames = new string[]
			{
				"BrandFlag",
				"BrandIconURL",
				"BrandInfo",
				"ExternalInfo"
			};
			CustomizedInfo._customizedInfoFieldTags = new uint[]
			{
				8u,
				34u,
				26u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.CustomizedInfo.Descriptor, null);
		}
	}
}
